/*
Navicat MySQL Data Transfer

Source Server         : 阿里云mysql
Source Server Version : 100121
Source Host           : 39.108.94.136:3306
Source Database       : db_ebuy

Target Server Type    : MYSQL
Target Server Version : 50599
File Encoding         : 65001

Date: 2017-07-06 16:30:26
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for t_bigtype
-- ----------------------------
DROP TABLE IF EXISTS `t_bigtype`;
CREATE TABLE `t_bigtype` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`name`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`remarks`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=5

;

-- ----------------------------
-- Records of t_bigtype
-- ----------------------------
BEGIN;
INSERT INTO `t_bigtype` VALUES ('1', '服饰', '服装'), ('2', '数码', null), ('3', '美食', null), ('4', '家电', null);
COMMIT;

-- ----------------------------
-- Table structure for t_comment
-- ----------------------------
DROP TABLE IF EXISTS `t_comment`;
CREATE TABLE `t_comment` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`content`  varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`createTime`  datetime NULL DEFAULT NULL ,
`nickName`  varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`replyContent`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`replyTime`  datetime NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=22

;

-- ----------------------------
-- Records of t_comment
-- ----------------------------
BEGIN;
INSERT INTO `t_comment` VALUES ('2', '积分大返利，机不可失失不再来', '2014-01-02 00:00:00', '会员VIP', '会员特惠月开始', '2014-01-02 00:00:00'), ('3', '开始配货开始配货开始配货开始配货', '2014-01-03 00:00:00', '阿木木', null, '2014-01-01 00:00:00'), ('4', '小米4发布了 1999 16G 3200W像素', '2014-01-04 00:00:00', '雷军', '假的！！', '2014-01-03 00:00:00'), ('6', '1234单号，有问题', '2014-08-28 00:00:00', '大熊2', '22', '2014-09-13 18:11:51'), ('12', '1234单号，有问题', '2014-08-28 00:00:00', '大熊2', '没问题啊', '2014-09-13 18:02:52'), ('13', '1234单号，有问题', '2014-08-28 00:00:00', '大熊2', '没问题。', '2014-09-13 18:04:45'), ('14', '1234单号，有问题', '2014-08-28 00:00:00', '大熊2', '没问题。', '2014-09-13 18:05:03'), ('17', '1234单号，有问题', '2014-08-28 00:00:00', '大熊2', '没问题。111', '2014-09-13 18:09:52'), ('18', '什么时候发货？', '2014-09-14 00:00:00', '小华', '块了', '2014-09-14 21:26:46'), ('21', '这个网站不错。', '2014-10-13 08:10:13', '哈哈', null, null);
COMMIT;

-- ----------------------------
-- Table structure for t_news
-- ----------------------------
DROP TABLE IF EXISTS `t_news`;
CREATE TABLE `t_news` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`content`  text CHARACTER SET utf8 COLLATE utf8_general_ci NULL ,
`createTime`  datetime NULL DEFAULT NULL ,
`title`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=11

;

-- ----------------------------
-- Records of t_news
-- ----------------------------
BEGIN;
INSERT INTO `t_news` VALUES ('1', '哈哈', '2013-01-01 00:00:00', '新闻一'), ('2', null, '2013-01-01 00:00:00', '新闻二'), ('3', null, '2013-01-01 00:00:00', '新闻三'), ('4', null, '2013-01-01 00:00:00', '新闻四'), ('5', null, '2013-01-01 00:00:00', '新闻五'), ('6', null, '2013-01-01 00:00:00', '新闻六'), ('7', null, '2013-01-01 00:00:00', '新闻七'), ('8', null, '2013-01-01 00:00:00', '新闻八'), ('9', null, null, '1'), ('10', null, null, '2');
COMMIT;

-- ----------------------------
-- Table structure for t_notice
-- ----------------------------
DROP TABLE IF EXISTS `t_notice`;
CREATE TABLE `t_notice` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`content`  text CHARACTER SET utf8 COLLATE utf8_general_ci NULL ,
`createTime`  datetime NULL DEFAULT NULL ,
`title`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=9

;

-- ----------------------------
-- Records of t_notice
-- ----------------------------
BEGIN;
INSERT INTO `t_notice` VALUES ('1', '哈哈11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111', '2014-10-01 00:00:00', '公告一'), ('2', null, '2014-10-01 00:00:00', '公告二'), ('3', null, '2014-10-01 00:00:00', '公告三'), ('4', null, '2014-10-01 00:00:00', '公告四'), ('5', null, '2014-10-01 00:00:00', '公告五'), ('6', null, '2014-10-01 00:00:00', '公告六'), ('7', null, '2014-10-01 00:00:00', '公告七'), ('8', null, '2014-10-01 00:00:00', '公告八');
COMMIT;

-- ----------------------------
-- Table structure for t_order
-- ----------------------------
DROP TABLE IF EXISTS `t_order`;
CREATE TABLE `t_order` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`cost`  float NOT NULL ,
`createTime`  datetime NULL DEFAULT NULL ,
`orderNo`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`status`  int(11) NOT NULL ,
`userId`  int(11) NULL DEFAULT NULL ,
PRIMARY KEY (`id`),
FOREIGN KEY (`userId`) REFERENCES `t_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
INDEX `FK_kh19wisaki6acmrs36vcmboj3` (`userId`) USING BTREE 
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=5

;

-- ----------------------------
-- Records of t_order
-- ----------------------------
BEGIN;
INSERT INTO `t_order` VALUES ('1', '964', '2014-10-22 07:57:09', '20141022075709', '3', '4'), ('2', '7896', '2014-10-22 07:59:51', '20141022075951', '3', '4'), ('3', '23190', '2014-10-22 08:04:24', '20141022080424', '3', '4'), ('4', '1999', '2017-07-06 01:06:18', '20170706010618', '1', '1');
COMMIT;

-- ----------------------------
-- Table structure for t_order_product
-- ----------------------------
DROP TABLE IF EXISTS `t_order_product`;
CREATE TABLE `t_order_product` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`num`  int(11) NOT NULL ,
`orderId`  int(11) NULL DEFAULT NULL ,
`productId`  int(11) NULL DEFAULT NULL ,
PRIMARY KEY (`id`),
FOREIGN KEY (`productId`) REFERENCES `t_product` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
FOREIGN KEY (`orderId`) REFERENCES `t_order` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
INDEX `FK_8k7n3hmcgwvrs3ljx47u8l5w6` (`orderId`) USING BTREE ,
INDEX `FK_1orhyavyw8w5a8cj5tmtqfpd2` (`productId`) USING BTREE 
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=2

;

-- ----------------------------
-- Records of t_order_product
-- ----------------------------
BEGIN;
INSERT INTO `t_order_product` VALUES ('1', '1', '4', '1');
COMMIT;

-- ----------------------------
-- Table structure for t_product
-- ----------------------------
DROP TABLE IF EXISTS `t_product`;
CREATE TABLE `t_product` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`description`  varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`hot`  int(11) NOT NULL ,
`hotTime`  datetime NULL DEFAULT NULL ,
`name`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`price`  int(11) NOT NULL ,
`proPic`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`specialPrice`  int(11) NOT NULL ,
`specialPriceTime`  datetime NULL DEFAULT NULL ,
`stock`  int(11) NOT NULL ,
`bigTypeId`  int(11) NULL DEFAULT NULL ,
`smallTypeId`  int(11) NULL DEFAULT NULL ,
PRIMARY KEY (`id`),
FOREIGN KEY (`bigTypeId`) REFERENCES `t_bigtype` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
FOREIGN KEY (`smallTypeId`) REFERENCES `t_smalltype` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
INDEX `FK_2vciohqujaeij91ujm5va2xs4` (`bigTypeId`) USING BTREE ,
INDEX `FK_qexns4el8esjqbdrqfys82ih8` (`smallTypeId`) USING BTREE 
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=2

;

-- ----------------------------
-- Records of t_product
-- ----------------------------
BEGIN;
INSERT INTO `t_product` VALUES ('1', '', '0', null, 'test', '1999', 'images/product/20170706010556.35', '0', null, '50', '2', '1');
COMMIT;

-- ----------------------------
-- Table structure for t_smalltype
-- ----------------------------
DROP TABLE IF EXISTS `t_smalltype`;
CREATE TABLE `t_smalltype` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`name`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`remarks`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`bigTypeId`  int(11) NULL DEFAULT NULL ,
PRIMARY KEY (`id`),
FOREIGN KEY (`bigTypeId`) REFERENCES `t_bigtype` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
INDEX `FK_a9rcrieyoywpcgb1luxsbir8s` (`bigTypeId`) USING BTREE 
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=2

;

-- ----------------------------
-- Records of t_smalltype
-- ----------------------------
BEGIN;
INSERT INTO `t_smalltype` VALUES ('1', '手机', '', '2');
COMMIT;

-- ----------------------------
-- Table structure for t_tag
-- ----------------------------
DROP TABLE IF EXISTS `t_tag`;
CREATE TABLE `t_tag` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`name`  varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`url`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=1

;

-- ----------------------------
-- Records of t_tag
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for t_user
-- ----------------------------
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
`id`  int(11) NOT NULL AUTO_INCREMENT ,
`address`  varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`birthday`  datetime NULL DEFAULT NULL ,
`dentityCode`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`email`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`mobile`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`password`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`sex`  varchar(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`status`  int(11) NOT NULL ,
`trueName`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`userName`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=10

;

-- ----------------------------
-- Records of t_user
-- ----------------------------
BEGIN;
INSERT INTO `t_user` VALUES ('1', '郑州22', '2014-09-04 00:00:00', '411522199407254576', 'admin@qq.com', '13523902576', '123', '女', '2', '张三3', 'java1234'), ('2', '江苏南京', '1989-01-01 00:00:00', '411522199407254572', '123@qq.com', '13523902572', '123', '女', '1', '', 'marry'), ('3', null, '2014-08-05 00:00:00', '1', '2', '3', '1', '女', '1', null, 'f1'), ('4', '好地方33', '2014-09-17 00:00:00', '213213', '1213@123.com', '32132132135', '1234', '女', '1', '张三3', 'jack'), ('5', '2321', '2014-09-14 00:00:00', '411522199407254576', 'abc@qq.com', '13523902576', '123', '男', '1', null, 'tom'), ('6', '江苏南京六合', '2014-08-31 00:00:00', '411522199407254576', '123@qq.com', '13523902576', '123', '男', '1', '王二小', 'jerry'), ('7', '江苏南京六合', '2009-09-29 00:00:00', '321321', '123@qq.com', '13523902576', '123', '女', '1', null, 'jack2'), ('8', '打理及2', '2010-02-03 00:00:00', '213213212', '212@qq.com', '23213212', '1232', '女', '1', '赵六2', 'zhaoliu2'), ('9', '3211', '2014-11-07 00:00:00', '21321', '21@qq.com', '321', '2321321', '男', '1', '李四222', '21321');
COMMIT;

-- ----------------------------
-- Auto increment value for t_bigtype
-- ----------------------------
ALTER TABLE `t_bigtype` AUTO_INCREMENT=5;

-- ----------------------------
-- Auto increment value for t_comment
-- ----------------------------
ALTER TABLE `t_comment` AUTO_INCREMENT=22;

-- ----------------------------
-- Auto increment value for t_news
-- ----------------------------
ALTER TABLE `t_news` AUTO_INCREMENT=11;

-- ----------------------------
-- Auto increment value for t_notice
-- ----------------------------
ALTER TABLE `t_notice` AUTO_INCREMENT=9;

-- ----------------------------
-- Auto increment value for t_order
-- ----------------------------
ALTER TABLE `t_order` AUTO_INCREMENT=5;

-- ----------------------------
-- Auto increment value for t_order_product
-- ----------------------------
ALTER TABLE `t_order_product` AUTO_INCREMENT=2;

-- ----------------------------
-- Auto increment value for t_product
-- ----------------------------
ALTER TABLE `t_product` AUTO_INCREMENT=2;

-- ----------------------------
-- Auto increment value for t_smalltype
-- ----------------------------
ALTER TABLE `t_smalltype` AUTO_INCREMENT=2;

-- ----------------------------
-- Auto increment value for t_tag
-- ----------------------------
ALTER TABLE `t_tag` AUTO_INCREMENT=1;

-- ----------------------------
-- Auto increment value for t_user
-- ----------------------------
ALTER TABLE `t_user` AUTO_INCREMENT=10;
